<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<tiles:insertDefinition name="defaultTemplate">
	<tiles:putAttribute name="body">

	<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/roleManagement.js"></script>
	<script type="text/javascript">$(document).ready(function() {dataTable('${oLanguage}','${pageContext.request.contextPath}')});</script>

		<div class="body">
				<div class="panel-heading">		
					<h4 class="fadeInUp animation-delay5" style="font-weight:bold">
					<span class="text-success">Role </span> <span style="color:#ccc; text-shadow:0 1px #fff"> Management</span>
					</h4>
				</div>	
			
			<form:form method="POST" modelAttribute="role" enctype="multipart/form-data">		
				<div class="row form-group"></div>
					<div class="row" style="margin-left: 9%;margin-top: 2%;">
					<div class="col-sm-3">
							<div class="form-group">
							<label class="control-label"><spring:message code="label.role.field.id" /></label>
							<input id="vaRoleId" name="vaRoleId" type="text" placeholder="Role Id" maxlength="2"    class="form-control input-sm" data-required="true"/>
							<form:errors path="vaRoleId" cssClass="error"/>
						</div>
					</div><!-- /.col -->
					<div class="col-sm-5">
						<div class="form-group">
							<label class="control-label"><spring:message code="label.role.field.name" /></label>
							<input  id="vaRoleName" name="vaRoleName" type="text" placeholder="Role Name" maxlength="200" class="form-control input-sm" data-required="true" />
							<form:errors path="vaRoleName" cssClass="error"/>
						</div>
					</div><!-- /.col -->
					<div class="col-sm-3">
						<div class="form-group">
							<label class="control-label"><spring:message code="label.role.field.status" /></label>
							<select class="form-control input-sm" style="width:200px;" name="vaStatus" id="vaStatus"> 
								<option value="A"> <spring:message code="label.role.dwl.active" /></option>
								<option value="I"> <spring:message code="label.role.dwl.inactive" /></option>
							</select>
							<form:errors path="vaStatus" cssClass="error"/>
						</div>
					</div><!-- /.col -->
					</div><!-- /.row -->
					
					<div class="row form-group" style="margin-top: 1%;">
						<div class="col-sm-12">
							<div class="col-sm-7 text-right">
							<input type="hidden" id="processType" name="processType" value="insertRole" >	
							<button type="submit"  class="btn btn-success btn-sm"><i class="fa fa-save"></i> Save </button>&nbsp;
							<button type="reset"  class="btn btn-default btn-sm" ><i class="fa fa-refresh"></i> Clear </button>
							</div>
						</div>
					</div>
					<br/><br/>
					<div class="col-sm-2" style="margin-right: 33.3%;"></div>
					<label for="" class="col-sm-1" style="text-align: right">Site</label>
						<div class="col-sm-5">
							<select class="form-control input-sm" name="vaSiteId" id="vaSiteId"> 
								<c:forEach items="${siteList }" var="siteList">
									<option value="${siteList.vaSiteId }"> ${siteList.vaSiteId } ${siteList.vaSiteName }</option>
								</c:forEach>
							</select>
						</div>
					<!-- /form-group -->				
				</form:form>	
				<!-- Data Table -->	
								
					<table style="width: 99%;margin-top: 5%;">
						<tr>
							<td>
				
					<table id="roledata" class="display"  class="table table-striped">
						<thead>
							<tr>
								<th><spring:message	code="label.role.field.No" /></th>
								<th><spring:message	code="label.role.field.id" /></th>
								<th><spring:message	code="label.role.field.name" /></th>
								<th><spring:message	code="label.role.field.setApp" /></th>
								<th><spring:message	code="label.role.field.setMenu" /></th>
								<th><spring:message	code="label.role.field.status" /></th>
								<th><spring:message	code="label.role.field.manage" /></th>
							</tr>
						</thead>							
					</table>
					
							</td>
						</tr>
					</table>
		</div>
	</tiles:putAttribute>
</tiles:insertDefinition>
</body>
</html>